<form class="form-horizontal form-bordered" method="post" action="/resource/save" id="_postRes">
    <input name="id" type="hidden" value="<#if (resource.id)??>${resource.id?c}</#if>">
    <div class="form-group">
        <label class="col-md-3 control-label">资源名称：</label>
        <div class="col-md-9">
            <input type="text" value="${(resource.name)!}" name="name" class="form-control" required/>
        </div>
    </div>
    <div class="form-group">
        <label class="col-md-3 control-label">资源路径：</label>
        <div class="col-md-9">
            <input type="text" value="${(resource.url)!}" name="url" class="form-control" placeholder="请填写url" required/>
        </div>
    </div>
    <div class="form-group">
        <label class="col-md-3 control-label">图标：</label>
        <div class="col-md-9">
            <input type="text" value="${(resource.icon)!}" name="icon" class="form-control"/>
        </div>
    </div>
    <div class="form-group">
        <label class="col-md-3 control-label">排序：</label>
        <div class="col-md-9">
            <input type="number" value="${(resource.seq)!0}" name="seq" class="form-control"/>
        </div>
    </div>
    <div class="form-group">
        <label class="col-md-3 control-label">上级资源：</label>
        <div class="col-md-9">
            <input name="pid" value="<#if (res_p.id)??>${res_p.id?c}</#if>" type="hidden" id="_pid">
            <input type="text" value="${(res_p.name)!}" class="form-control" id="_thisSel" onclick="getSelectTree()" placeholder="留空则为根节点" readonly/>
        </div>
    </div>
    <div class="form-group">
        <label class="col-md-3 control-label">资源类型：</label>
        <div class="col-md-9">
            <select class="form-control" name="resourceType">
                <option value="0">菜单</option>
                <option value="1">按钮</option>
            </select>
        </div>
    </div>
</form>